]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
padOsd: peek pads attached to the same tablet
authorCarlos Garnacho <carlosg@gnome.org>
Mon, 13 Feb 2017 10:55:24 +0000 (11:55 +0100)
committerCarlos Garnacho <carlosg@gnome.org>
Mon, 13 Mar 2017 15:34:27 +0000 (16:34 +0100)
https://bugzilla.gnome.org/show_bug.cgi?id=779986

js/ui/padOsd.js

index e43b9a04f8ba4a544303d2eb305d7972df9d70f7..e172a6e4fd0aa92550e4e3c4fed8cd5ad83e085f 100644 (file)
@@ -528,6 +528,7 @@ const PadOsd = new Lang.Class({
 
     _init: function (padDevice, settings, imagePath, editionMode, monitorIndex) {
         this.padDevice = padDevice;
+        this._groupPads = [ padDevice ];
         this._settings = settings;
         this._imagePath = imagePath;
         this._editionMode = editionMode;
@@ -540,6 +541,13 @@ const PadOsd = new Lang.Class({
                 this.destroy();
         }));
 
+        deviceManager.list_devices().forEach(Lang.bind(this, function(device) {
+            if (device != this.padDevice &&
+                device.get_device_type() == Clutter.InputDeviceType.PAD_DEVICE &&
+                this.padDevice.is_grouped(device))
+                this._groupPads.push(device);
+        }));
+
         this.actor = new St.BoxLayout({ style_class: 'pad-osd-window',
                                         x_expand: true,
                                         y_expand: true,